<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebRTC Audio Demo</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }

        .control-panel {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 20px;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        button {
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        button:hover {
            background-color: #45a049;
        }

        button:disabled {
            background-color: #cccccc;
            cursor: not-allowed;
        }

        .status {
            margin-top: 20px;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            height: 200px;
            overflow-y: auto;
        }
    </style>
</head>

<body>
    <h1>WebRTC Audio Demo</h1>
    <p>
        <audio id="audio-player" autoplay></audio>
    </p>
    <p>
        <label for="use-audio">Use audio</label>
        <select id="audio-input">
            <option value="" selected>Default device</option>
        </select>
    </p>
    <p>
        <label for="audio-file">Select audio file to play:</label>
        <select id="audio-file">
            <option value="assets/sample_zh.mp3">sample_zh.mp3</option>
            <option value="assets/sample.wav">sample.wav</option>
        </select>
    </p>
    <div class="control-panel">
        <button id="start">Start Audio Connection</button>
        <button id="stop" disabled>Stop Audio Connection</button>
    </div>
    <div class="status" id="status">
        <p>Status messages will appear here.</p>
    </div>

    <script src="/static/demo.js"></script>
</body>

</body>

</html>